{% extends "bootstrap/base.html"  %}
{% block content %}
{% import "bootstrap/wtf.html" as wtf %}
<div class="container">
    <form class="form-horizontal" method="POST" action="/upload/validate?op_id={{op_id}}" enctype="multipart/form-data">
        <fieldset>

            <div id="legend" class="">
                <legend>
                    <a href="{{url_for('view.upload_list')}}">数据列表</a>
                    >>
                    <a href="{{url_for('view.upload')}}">数据录入</a>
                </legend>
            </div>

            <div class="form-group">
                <label class="control-label  col-sm-4">上传图片</label>
                <div class="col-sm-3">
                    <input class="input-file" name="img" type="file">
                </div>
            </div>

            <div class="form-group">
                <label class="control-label  col-sm-4">上传视频</label>
                <div class="col-sm-3">
                    <input class="input-file" name="video" type="file">
                </div>
            </div>

            <div class="control-group">
                <div>
                    {{ wtf.quick_form(form, id="upload", form_type="horizontal", horizontal_columns=('sm', 4, 3)) }}
                </div>
            </div>

            <div class="control-group">
                <label class="control-label  col-sm-4">课程简介</label>
                <div class="col-sm-3">
                    <textarea name="summary"></textarea>
                </div>
            </div>

            <div class="controls text-center">
                <button class="btn" type="submit">提交</button>
            </div>

        </fieldset>
    </form>
</div>
{% endblock %}
